<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping package="com.jd.ty.pojo">
	<class name="Employee" table="EMPLOYEE" schema="TYMS">
		<id name="employeeId" type="java.lang.Long">
			<column name="EMPLOYEE_ID" precision="10" scale="0" />
			<generator class="identity"></generator>
		</id>
		<property name="employeeName" type="java.lang.String">
			<column name="EMPLYEE_NAME" length="20" not-null="true"
				unique="true" />
		</property>
		<property name="birthday" type="timestamp">
			<column name="BIRTHDAY" />
		</property>
		<property name="postcode" type="java.lang.String">
			<column name="POSTCODE" length="20" unique="false" />
		</property>
		<property name="homePhoneNumber" type="java.lang.String">
			<column name="HOME_PHONE_NUMBER" length="20" />
		</property>
		<many-to-one name="department" class="Dictionary" fetch="select"
			lazy="false">
			<column name="DEPARTMENT_ID" precision="10" scale="0" />
		</many-to-one>

		<many-to-one name="degree" class="Dictionary" fetch="select"
			lazy="false">
			<column name="DEGREE_ID" precision="10" scale="0" />
		</many-to-one>

		<!-- 7/Aug/2011: adding new hb attributes -->
		<many-to-one name="sex" class="Dictionary" fetch="select"
			lazy="false">
			<column name="SEX_ID" precision="10" scale="0" />
		</many-to-one>
		<property name="ethnic" type="java.lang.String">
			<column name="ETHNIC" length="20" unique="false" />
		</property>
		<many-to-one name="registeredResidenceType" class="Dictionary"
			fetch="select" lazy="false">
			<column name="REGISTERED_RESIDENCE_TYPE" precision="10" scale="0" />
		</many-to-one>
		<property name="birthPlace" type="java.lang.String">
			<column name="BIRTH_PLACE" length="20" unique="false" />
		</property>
		<property name="age" type="java.lang.Integer">
			<column name="AGE" length="4" unique="false" />
		</property>
		
		<property name="currentlyAddress" type="java.lang.String">
			<column name="CURRENTLY_ADDRESS" length="20" unique="false" />
		</property>
		<many-to-one name="salary" class="Dictionary" fetch="select"
			lazy="false">
			<column name="SALARY" precision="10" scale="0" />
		</many-to-one>
		<many-to-one name="socialSecurityStatus" class="Dictionary"
			fetch="select" lazy="false">
			<column name="SOCIAL_SECURITY_STATUS" precision="10" scale="0" />
		</many-to-one>
		<property name="socialSecurityTime" type="timestamp">
			<column name="SOCIAL_SECURITY_TIME" />
		</property>
		<many-to-one name="socialSecurityType" class="Dictionary"
			fetch="select" lazy="false">
			<column name="SOCIAL_SECURITY_TYPE" precision="10" scale="0" />
		</many-to-one>
		<many-to-one name="socialSecuritySort" class="Dictionary"
			fetch="select" lazy="false">
			<column name="SOCIAL_SECURITY_SORT" precision="10" scale="0" />
		</many-to-one>
		<many-to-one name="socialSecurityCardStatus" class="Dictionary"
			fetch="select" lazy="false">
			<column name="SOCIAL_SECURITY_CARD_STATUS" precision="10"
				scale="0" />
		</many-to-one>
		<many-to-one name="healthSecurityCardStatus" class="Dictionary"
			fetch="select" lazy="false">
			<column name="HEALTH_SECURITY_CARD_STATUS" precision="10"
				scale="0" />
		</many-to-one>
		<many-to-one name="socialSecurityCompany" class="Dictionary"
			fetch="select" lazy="false">
			<column name="SOCIAL_SECURITY_COMPANY" precision="10" scale="0" />
		</many-to-one>
		<property name="announcedSalary" type="java.lang.String">
			<column name="ANNOUNCED_SALARY" length="20" unique="false" />
		</property>
		<property name="punishmentRecord" type="java.lang.String">
			<column name="PUNISHMENT_RECORD" length="200" unique="false" />
		</property>
		<many-to-one name="trainingState" class="Dictionary"
			fetch="select" lazy="false">
			<column name="TRAINING_STATE" precision="10" scale="0" />
		</many-to-one>
		<many-to-one name="marriagementState" class="Dictionary"
			fetch="select" lazy="false">
			<column name="MARRIAGEMENT_STATE" precision="10" scale="0" />
		</many-to-one>
		<property name="businessName" type="java.lang.String">
			<column name="BUSINESS_NAME" length="20" unique="false" />
		</property>
		<property name="positionLength" type="java.lang.String">
			<column name="POSITION_LENGTH" length="20" unique="false" />
		</property>
		<!-- End 7/Aug/2011: adding new hb attributes -->

		<!-- 9/Aug/2011: adding new hb attributes -->
		<property name="salaryAmount" type="java.lang.String">
			<column name="SALARY_AMOUNT" length="20" unique="false" />
		</property>
		<property name="chineseBirthday" type="java.lang.String">
			<column name="CHINESE_BIRTHDAY" length="20" unique="false" />
		</property>
		<!-- End 9/Aug/2011: adding new hb attributes -->

		<!-- 10/Aug/2011: adding new hb attributes -->
		<bag name="contracts" fetch="select" cascade="all" inverse="true"
			lazy="false">
			<key column="EMPLOYEE_ID" />
			<one-to-many class="com.jd.ty.pojo.Contract" />
		</bag>

		<bag name="experiences" fetch="select" cascade="all" inverse="true"
			lazy="false">
			<key column="EMPLOYEE_ID" />
			<one-to-many class="Experience" />
		</bag>
		<bag name="credentials" fetch="select" cascade="all" inverse="true"
			lazy="false">
			<key column="EMPLOYEE_ID" />
			<one-to-many class="Credentials" />
		</bag>
		<!-- End 10/Aug/2011: adding new hb attributes -->

		<property name="registerTime" type="timestamp">
			<column name="REGISTER_TIME" />
		</property>
		<property name="phoneNumber" type="java.lang.String">
			<column name="PHONE_NUMBER" length="50" />
		</property>
		<property name="socialId" type="java.lang.String">
			<column name="SOCIAL_ID" length="20" />
		</property>
		<property name="address" type="java.lang.String">
			<column name="ADDRESS" length="200" />
		</property>
		<property name="endTimeOfIntern" type="timestamp">
			<column name="END_TIME_OF_INTERN" />
		</property>

		<property name="timeOfEmployment" type="timestamp">
			<column name="TIME_OF_EMLOYMENT" />
		</property>

		<many-to-one name="socialStatus" class="Dictionary" fetch="select"
			lazy="false">
			<column name="SOCIAL_STATUS_ID" precision="10" scale="0" />
		</many-to-one>
		<property name="timeOfLeaving" type="timestamp">
			<column name="TIME_OF_LEAVING" length="20" />
		</property>
		<property name="remarks" type="java.lang.String">
			<column name="REMARKS" length="200" />
		</property>
		<many-to-one name="position" class="Dictionary" fetch="select"
			lazy="false">
			<column name="POSITION_ID" precision="10" scale="0" />
		</many-to-one>
		<many-to-one name="userInfo" class="com.jd.ty.pojo.User"
			fetch="select" cascade="all" lazy="false">
			<column name="USER_INFO_ID" precision="10" scale="0" />
		</many-to-one>
		<property name="contactInBJ" type="java.lang.String">
			<column name="CONTECT_IN_BJ" length="20" />
		</property>
		<property name="phoneOfContactInBJ" type="java.lang.String">
			<column name="PHONE_OF_CONTACT_IN_BJ" length="50" />
		</property>
		<property name="addressInBJ" type="java.lang.String">
			<column name="ADDRESS_IN_BJ" length="200" />
		</property>
		
		<property name="politicalStatus" type="java.lang.String">
			<column name="POLITICAL_STATUS" length="20" />
		</property>
		<property name="familyMember" type="java.lang.String">
			<column name="FAMILY_MEMBER" length="20" />
		</property>
		<property name="familyMemberAddress" type="java.lang.String">
			<column name="FAMILY_MEMBER_ADDRESS" length="50" />
		</property>
		<property name="familyMemberPhone" type="java.lang.String">
			<column name="FAMILY_MEMBER_PHONE" length="20" />
		</property>
		<property name="graduatedSchool" type="java.lang.String">
			<column name="GRADUATED_SCHOOL" length="20" />
		</property>
		<property name="graduatedMajor" type="java.lang.String">
			<column name="GRADUATED_MAJOR" length="20" />
		</property>
		<property name="graduatedTime" type="timestamp">
			<column name="GRADUALTED_TIME" length="20" />
		</property>
		<property name="employeeNumber" type="java.lang.String">
			<column name="EMPLOYEE_NUMBER" length="20" />
		</property>
		<property name="email" type="java.lang.String">
			<column name="EMAIL" length="50" />
		</property>
		<property name="onBoardWay" type="java.lang.String">
			<column name="ON_BOARD_WAY" length="20" />
		</property>
		<property name="employeeClass" type="java.lang.String">
			<column name="EMPLOYEE_CLASS" length="20" />
		</property>
		<many-to-one name="unifiedEntrance" class="Dictionary" fetch="select"
			lazy="false">
			<column name="UNIFIED_ENTRANCE" precision="10" scale="0" />
		</many-to-one>
		<many-to-one name="quitJobPapers" class="Dictionary" fetch="select"
			lazy="false">
			<column name="QUIT_JOB_PAPERS" precision="10" scale="0" />
		</many-to-one>
		<property name="internSalary" type="java.lang.String">
			<column name="INTERN_SALARY" length="20" />
		</property>
		<property name="contractSalary" type="java.lang.String">
			<column name="CONTRACT_SALARY" length="20" />
		</property>
		<property name="performanceSalary" type="java.lang.String">
			<column name="PERFORMANCE_SALARY" length="20" />
		</property>
		<bag name="bankCards" fetch="select" cascade="all" inverse="true"
			lazy="false">
			<key column="EMPLOYEE_ID" />
			<one-to-many class="com.jd.ty.pojo.BankCard" />
		</bag>
	</class>
</hibernate-mapping>
